import React from 'react';
import IScroll from 'iscroll/build/iscroll';
import LineDetailItem from './lineDetailItem';

import './index.less';

export default class LineSites extends React.PureComponent {
  componentDidMount() {
    setTimeout(() => {
      new IScroll('.line-detail-wrapper', {
        click: true,
        scrollY: false,
        eventPassthrough: true,
        preventDefault: false,
        scrollX: true,
      });
    });
  }

  render() {
    return (
      <div>
        <div className="line-detail-wrapper">
          <div className="line-detail">
            {
            [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((_, index) => <LineDetailItem key={index} value={_} />)
            }
          </div>
        </div>
      </div>
    );
  }
}
